package com.example.demo.Controller;

import com.example.demo.Model.Book;
import com.example.demo.Service.BookService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;


@RestController
@RequestMapping("/book")
public class BookController {
    @PostMapping("/getList")
    public List<Book> getList() {
        List<Book> list = new BookService().getList();
        return list;
    }

}
